﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WebManageMenus>" %>
<%@ import Namespace="Common.Background.Entity" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	菜单维护
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    
    <h1><%= Html.ActionLink("菜单维护", "WebWebManageMenusList", "System")%>-<%= Model.MenuID==int.MinValue?"添加":"修改" %>菜单</h1>
    <% =Html.Partial("UCWebManageMenus", Model)%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">

    <script src="../../Scripts/jquery.validate.js" type="text/javascript"></script>
    
<script type="text/javascript">

    $(document).ready(function() {
        $("form").validate({
            rules: {
                MenuName: {
                    required: true,
                    minlength: 2,
                    maxlength: 50
                },
                LinkUrl: {
                    required: true,
                    minlength: 2,
                    maxlength: 255
                },
                About: {
                    required: true,
                    minlength: 2,
                    maxlength: 4000
                },
                SortNumber: {
                    required: true,
                    number: true
                }
            }, messages: {
                MenuName: {
                    required: "请输入菜单名字",
                    minlength: "菜单名字至少为2个字符，最多为50个字符",
                    maxlength: "菜单名字至少为2个字符，最多为50个字符"
                },
                LinkUrl: {
                    required: "请输入菜单连接地址",
                    minlength: "菜单连接地址至少为2个字符，最多为50个字符",
                    maxlength: "菜单连接地址至少为2个字符，最多为50个字符"
                },
                About: {
                    required: "请输入菜单说明",
                    minlength: "菜单说明至少为2个字符，最多为4000个字符",
                    maxlength: "菜单说明至少为2个字符，最多为4000个字符"
                },
                SortNumber: {
                    required: "请输入菜单排序数字",
                    number: "菜单排序必须输入数字"
                }
            }
        });
    });
   
    function Submit(input) {
        return true;
    }
</script>

</asp:Content>